package com.zhongmeng.rxjava2test.adapter

import android.content.Context

import com.zhongmeng.rxjava2test.R
import com.zhongmeng.rxjava2test.bean.Notice
import com.zhy.adapter.recyclerview.CommonAdapter
import com.zhy.adapter.recyclerview.base.ViewHolder
import java.util.*

/**
 * author :rcw.
 * date :2017/10/12 14:53.
 */

class NoticeAdapter(context: Context, layoutId: Int, datas: List<Notice.NoticeListBean>) : CommonAdapter<Notice.NoticeListBean>(context, layoutId, datas) {

    protected override fun convert(holder: ViewHolder, o: Notice.NoticeListBean, position: Int) {
        holder.setText(R.id.notic_name, datas[position].title)
        holder.setText(R.id.notic_date, datas[position].notice_date)
        /*LinearLayout linearLayout=holder.getView(R.id.item);
        linearLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                LogUtils.z("URL="+datas.get(position).getUrl()+"posion="+position);
            }
        });*/
    }

}
